package info.ask4research.service.impl;

import info.ask4research.dao.core.AbstractDao;
import info.ask4research.dao.impl.ActivityDAO;
import info.ask4research.model.activities.Activity;
import info.ask4research.service.IActivityService;
import info.ask4research.service.core.impl.AbstractServiceImpl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service(value="activityService")
@Transactional
public class ActivityService extends AbstractServiceImpl<Activity> implements IActivityService {
	@Resource(name = "activityDAO")
	ActivityDAO dao;

	@Override
	public AbstractDao<Activity> getDao() {
		return dao;
	}

	@Override
	public void setDao(AbstractDao<Activity> dao) {
		this.dao = (ActivityDAO) dao;
		
	}

	@Override
	public Activity getbyGraphId(String activityId) {
		return dao.getbyGraphId(activityId);
	}

	@Override
	public Activity getbyGraphIdAndUoLId(String activityId, int id) {
		return dao.getbyGraphIdAndUoLId(activityId, id);
	}
	


}
